package com.kayt.cyberBar.cuser.business.dao.impl;

import java.sql.SQLException;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.kayt.cyberBar.common.dao.EntityDao;
import com.kayt.cyberBar.cuser.business.dao.IHandWorkDetailDao;
import com.kayt.cyberBar.cuser.business.entity.po.BHandWorkDetail;

@Repository("handWorkDetailDao")
public class HandWorkDetailDaoImpl implements IHandWorkDetailDao {
	@Autowired
	private EntityDao entityDao;
	@Override
	public void save(BHandWorkDetail entity) throws SQLException {
		entityDao.save(entity);
	}
	@Override
	public void update(BHandWorkDetail entity) throws SQLException {
		entityDao.update(entity);
	}
	/* (non-Javadoc)
	 * @see com.kayt.cyberBar.cuser.business.dao.IHandWorkDetailDao#findByHandCode(java.lang.String)
	 */
	@Override
	public BHandWorkDetail findByHandCode(String handCode) throws SQLException {
		return entityDao.getObj(BHandWorkDetail.class, "o.handWorkCode = ?", new Object[]{handCode});
	}
}
